Skip to content

feat(demo): add a doctor command that says how to fix each problem - #22

Open
tela wants to merge 1 commit into
mainfrom
feat/demo-doctor
Open

tela wants to merge 1 commit into
mainfrom
feat/demo-doctor

Conversation

@tela

@tela tela commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Motivation

When the demo does not work, the presenter has to work out which of several things is wrong: the web UI was not built in, the port is taken, an app emulator is down or restarted, or the world is not seeded. ready covers only the app emulators.

Changes

  • New doctor command in demos/acme-commerce-lenders. It checks the UI build, that the state file is writable, that the --addr port is free, each app emulator, and whether the seeded world is still held (the same check the UI readiness strip uses). Each failure prints its fix. Exit 1 if any check fails. It changes nothing.
  • Notes when an emulator you run yourself has no <VENDOR>_EMULATOR_VERSION.
  • ui.Built() so the binary can say whether it carries the real UI.
  • docs/troubleshooting.md now says to check with doctor first.

Tests

  • go test ./... and go vet ./... via make test vet: pass.
  • New cli tests: all-green seeded world, and a down emulator plus busy port plus unseeded world, each naming its fix.
  • Ran make kit APP=acme-commerce-lenders ARGS="doctor --addr 127.0.0.1:0" against a real LocalStack with Stripe only: it reported plaid and xero not included with the PLAID_EMULATOR_URL and XERO_EMULATOR_URL fix, the unbuilt UI, and the unseeded world.

Related

Follows localstack-samples/localstack-app-emulators PR #21.

A presenter hitting a blank page, a busy port or a restarted emulator had to read three docs to find which. One command now checks all of it and names the fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant